package pojo;

/**
 * 二叉树的基础类
 */
public class Node {

    /**
     * 数据
     */
    private int data;
    /**
     * 右节点
     */
    private Node tight;
    /**
     * 左节点
     */
    private Node left;

    public Node(int data) {
        this.data = data;
    }

    public int getData() {
        return data;
    }

    public Node getTight() {
        return tight;
    }

    public Node getLeft() {
        return left;
    }

    public void setData(int data) {
        this.data = data;
    }

    public void setTight(Node tight) {
        this.tight = tight;
    }

    public void setLeft(Node left) {
        this.left = left;
    }

    @Override
    public String toString() {
        return "Node{" +
                "data=" + data +
                ", tight=" + tight +
                ", left=" + left +
                '}';
    }
}
